#include "emoji.h"
#include "ui_emoji.h"
#include "mainwindow.h"

#include<QTextEdit>
#include<QTextCursor>

emoji::emoji(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::emoji)
{
    ui->setupUi(this);
    setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint);      //浮动于窗口上方
    //setWindowFlags(windowFlags()&~Qt::WindowMinMaxButtonsHint);    //隐藏最大化按钮
    //setFixedSize(500, 150);                                        //禁止拖动窗口大小
}

emoji::~emoji()
{
    delete ui;
}

void emoji::on_pushButton_clicked()
{
    QString path=":/new/prefix1/表情库/大笑.png";
    emit send_signal(path);
}

void emoji::on_pushButton_2_clicked()
{
    QString path=":/new/prefix1/表情库/嘿嘿.png";
    emit send_signal(path);
}

void emoji::on_pushButton_3_clicked()
{
    QString path=":/new/prefix1/表情库/呵呵.png";
    emit send_signal(path);
}

void emoji::on_pushButton_4_clicked()
{
    QString path=":/new/prefix1/表情库/嘻嘻.png";
    emit send_signal(path);
}

void emoji::on_pushButton_5_clicked()
{
    QString path=":/new/prefix1/表情库/哈哈.png";
    emit send_signal(path);
}

void emoji::on_pushButton_8_clicked()
{
    QString path=":/new/prefix1/表情库/斜眼笑.png";
    emit send_signal(path);
}

void emoji::on_pushButton_6_clicked()
{
    QString path=":/new/prefix1/表情库/笑哭了.png";
    emit send_signal(path);
}

void emoji::on_pushButton_7_clicked()
{
    QString path=":/new/prefix1/表情库/笑得满地打滚.png";
    emit send_signal(path);
}

void emoji::on_pushButton_9_clicked()
{
    QString path=":/new/prefix1/表情库/苦笑.png";
    emit send_signal(path);
}
